package com.custom.common.sha256;

import org.apache.commons.lang.RandomStringUtils;

import java.util.Map;

/**
 * @ClassName: SHA256Sign
 * @description:
 * @author: liukui
 * @date: 2018/11/17 16:03
 * @version: 1.0
 */
public class SHA256Sign {
    public SHA256Sign() {
    }

    public static Map<String, String> sign(Map<String, String> requestParames, String secretKey) {
        requestParames.put("ctime", System.currentTimeMillis() + "");
        requestParames.put("nonce", RandomStringUtils.randomAlphanumeric(20));
        return SHA256Verify.genSha256SignMap(requestParames, secretKey);
    }
}
